package fu.capstone.hanoicityguide.business.bo.attraction;

import java.util.ArrayList;

import android.content.Context;
import fu.capstone.hanoicityguide.business.model.Attraction;
import fu.capstone.hanoicityguide.business.model.Category;
import fu.capstone.hanoicityguide.dataaccess.attraction.AttractionDAO;
import fu.capstone.hanoicityguide.dataaccess.attraction.AttractionDAOImp;

public class AttractionBOImp implements AttractionBO {
	private Context context;

	private AttractionDAO dao;

	public Context getContext() {
		return context;
	}

	public void setContext(Context context) {
		this.context = context;
	}

	public AttractionBOImp() {

	}

	public AttractionBOImp(Context ctx) {
		this.context = ctx;
		dao = new AttractionDAOImp(context);
	}

	@Override
	public ArrayList<Attraction> listAttraction(ArrayList<String> filter, String sorter) {
		// get list attraction by filter and sorter
		return dao.listAttraction(filter, sorter);
	}

	@Override
	public ArrayList<Attraction> searchAttraction(String keyWord,
			ArrayList<String> filter, String sorter) {
		return dao.searchAttraction(keyWord, filter, sorter);
	}

	@Override
	public Attraction browseAttraction(int attractionID) {
		return dao.browseAttraction(attractionID);
	}

	@Override
	public String[] getListType(int categoryID) {
		return dao.getListType(categoryID);
	}

	@Override
	public ArrayList<Category> getListCategory(String filter) {
		return dao.getListCategory(filter);
	}

}
